// GreetingController.java
package com.bizzan.bitrade.controller;

import com.bizzan.bitrade.service.GreetingService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GreetingController {
    // 服务消费者
    @Reference
    private GreetingService greetingService;
    
    @GetMapping("/greeting")
    public String greeting(@RequestParam String name) {
        return greetingService.sayHello(name);
    }
}